#include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
    int numPairsDivisibleBy60(vector<int>& time) 
    {
        int ans = 0, cnt[60]{};
        for (int t : time) 
        {
            ans += cnt[(60 - t % 60) % 60];
            cnt[t % 60]++;
        }
        return ans;
    }
};

int main()
{
	return 0;
}